package com.nmsl.sn.service.impl;

import com.nmsl.sn.domain.Sn;
import com.nmsl.sn.domain.SnPatient;
import com.nmsl.sn.mapper.SnMapper;
import com.nmsl.sn.mapper.SnUserMapper;
import com.nmsl.sn.service.ISnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SnServiceImpl implements ISnService{

    @Autowired
    private SnMapper snMapper;

    @Autowired
    private SnUserMapper snUserMapper;

    // 根据医生ID查询挂号的患者列表
    @Override
    public List<Sn> getPatientsByDoctorId(Integer doctorId) {
        return snMapper.getPatientsByDoctorId(doctorId);
    }

    @Override
    public Integer findMyUserid(Integer userid) {
        return snUserMapper.findMyuserid(userid);
    }

    @Override
    public SnPatient findPatientById(Integer userid) {
        return snMapper.findPatientById(userid);
    }


}
